import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
// https://vitejs.dev/config/
export default defineConfig(async ()=>{
  const UnoCss = await import('unocss/vite').then(i => i.default)
  return {
    build: {
      sourcemap: true
    },
    plugins: [
      // https://github.com/unocss/unocss
      UnoCss(),
      // 注意，UniApp插件一定要放到后面！
      uni(),
    ],
    resolve: {
      extensions: ['.js','.mjs']
    }
  }
})
